package com.hhd.flow.engine.lisener;

import com.hhd.flow.engine.lisener.event.*;

public interface FlowListener {
    //启动流程之前触发
    default void onStartProcessBefore(StartProcessBeforeEvent event) {
    }

    //启动流程之后触发
    default void onStartProcessAfter(StartProcessAfterEvent event) {
    }

    //进入用户任务之前触发
    default void onBeforeEnterUserTask(BeforeEnterUserTaskEvent event) {
    }

    //进入用户任务之后触发
    default void onAfterEnterUserTask(AfterEnterUserTaskEvent event) {
    }

    //用户任务审批结束之前触发
    default void onUserTaskBeforeComplete(UserTaskCompleteEvent event) {
    }

    //用户任务审批结束之后触发
    default void onUserTaskAfterComplete(UserTaskCompleteEvent event) {
    }

    //每次用户审批之前触发
    default void onUserTaskCompleteBeforeEvery(UserTaskCompleteEveryEvent event) {
    }

    //每次用户审批之后触发
    default void onUserTaskCompleteAfterEvery(UserTaskCompleteEveryEvent event) {
    }

    //流程审批通过之前触发
    default void onProcessBeforeApproved(ProcessApprovedEvent event) {
    }

    //流程审批通过之后触发
    default void onProcessAfterApproved(ProcessApprovedEvent event) {
    }

    //流程被不通过之后触发
    default void onFlowUserTaskBeforeEnd(FlowUserTaskEndEvent event) {
    }

    //流程被不通过之后触发
    default void onFlowUserTaskAfterEnd(FlowUserTaskEndEvent event) {
    }

    //流程被退回之前触发
    default void onFlowUserTaskBeforeToForm(FlowUserTaskToFormEvent event) {
    }

    //流程被退回之后触发
    default void onFlowUserTaskAfterToForm(FlowUserTaskToFormEvent event) {
    }

    //进入流程里面的节点后触发
    default void onEnterNode(EnterNodeEvent event) {
    }

    //流过流程里面的节点后触发
    default void onPassNode(PassNodeEvent event) {
    }

    //流程结束之前触发
    default void onProcessBeforeFinish(ProcessFinishEvent event) {

    }

    //流程结束之后触发
    default void onProcessAfterFinish(ProcessFinishEvent event) {

    }

    //创建用户任务的时候触发
    default void onCreateUserTaskEvent(CreateUserTaskEvent event) {

    }

    default void onBeforeWidthdraw(WithdrawEvent event) {

    }

    default void onAfterWidthdraw(WithdrawEvent event) {

    }
}
